<?php
/**
 * Created by PhpStorm.
 * User: 17828
 * Date: 2018/10/15
 * Time: 14:01
 */
namespace app\common\model;

use think\Model;

class Drivelevel extends Model
{
    public function getDrivePrice($where,$page,$limit){
        $list['data'] = db('drivelevel')->alias('d')
            ->join('driving_licence dl','d.driving_licence_id = dl.driving_licence_id')
            ->field('d.*,dl.drive_level')
            ->where($where)
            ->page($page,$limit)->select();

        $list['count'] = db('drivelevel')->alias('d')
            ->join('driving_licence dl','d.driving_licence_id = dl.driving_licence_id')
            ->field('d.*,dl.drive_level')
            ->where($where)
            ->count();
        return $list;

    }
}